/* =========================================
   RESPONSIVE PROYECTOS
   (sobre-escribe estilos fijos del CSS base)
========================================= */

/* --- Tablet grande / Laptop chica --- */
@media (max-width: 992px){

  /* HEADER */
  .header{
    width: 100%;              /* corrige el "with" del CSS base */
    height: auto;
    padding: 12px 16px;
    justify-content: space-between;
    gap: 12px;
  }

  .logo{
    width: 220px;
    height: auto;
    margin-left: 0;           /* quita el margen fijo */
    margin-top: 0;
  }

  .barnav{
    height: auto;
    justify-content: flex-end;
    flex-wrap: wrap;          /* permite que el menú baje a 2 líneas */
    gap: 8px 14px;
    padding: 0;
  }

  .menu{
    width: auto;
    height: auto;
    margin-right: 0;
  }

  .barnav a{
    white-space: nowrap;
    font-size: 14px;
  }

  /* GRID PROYECTOS */
  .projects-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .project-img{
    height: 220px;
  }

  /* FOOTER */
  .footer{
    height: auto;             /* en móvil NO uses height fija */
    padding: 24px 16px 10px;
  }

  .footer-grid{
    margin-left: 0;           /* quita márgenes fijos */
    margin-top: 0;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 18px;
  }

  .footer h4{
    margin-top: 0;            /* quita el margen negativo */
  }

  .footer-logo{
    margin: 0;
    height: 140px;
  }

  .container-footer1{
    margin-top: 12px;
  }
}


/* --- Tablet / Móvil grande --- */
@media (max-width: 768px){

  /* HEADER */
  .header{
    flex-direction: column;   /* logo arriba, menú abajo */
    align-items: center;
  }

  .barnav{
    justify-content: center;
  }

  /* GRID */
  .projects{
    width: min(1200px, 94%);
  }

  .projects-grid{
    grid-template-columns: repeat(2, 1fr);
  }

  .project-img{
    height: 200px;
    border-radius: 12px;
  }

  /* LIGHTBOX */
  .lightbox-content{
    width: 94%;
    max-width: 720px;
  }

  .lightbox-close{
    top: -12px;
    right: -12px;
  }

  /* FOOTER */
  .footer-grid{
    grid-template-columns: 1fr; /* footer en 1 columna */
    text-align: center;
    justify-items: center;
  }

  .footer a{
    margin-left: 0;
  }

  .small{
    margin-left: 0;
  }
}


/* --- Celular --- */
@media (max-width: 520px){

  /* HEADER */
  .logo{
    width: 200px;
  }

  .barnav a{
    font-size: 13px;
  }

  /* GRID */
  .projects-grid{
    grid-template-columns: 1fr;
  }

  .project-img{
    height: 210px;
  }

  .project-title{
    font-size: 13px;
  }

  /* LIGHTBOX */
  .lightbox-close{
    width: 38px;
    height: 38px;
    font-size: 24px;
    line-height: 38px;
  }
}